Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch makes the Optimas/APOSMM example work with spawn, as well as fork.
I have removed the extra comm created with the multiprocessing server queues and instead am using the QCommProcess
directly. I have not tried with a thread as yet, but it works with a process.
Spawn still failed due to a threadlock on the executor
comm
attribute (which is added in worker.py). This would be the wrong comm anyway when passing to the APOSMM process. Removing this enables spawn to work.Some attention needs to be paid to passing the executor, to ensure this works both when actually used in the gen and when no executor exists.